#ifndef __DISTANCE_H__
#define __DISTANCE_H__

#include "Tree.h"
#include <list>

enum DistanceType { NORMAL}; // with an option of expending

struct Match
{
	string a;
	string b;
	int distance;
};

struct Delete 
{
	string a;
	int distance;
};

typedef struct Match Match;
typedef struct Delete Delete;

class Distance
{
	DistanceType Dtype;
	list<Match> MatchList;
	list<Delete> DeleteList;

public:
	Distance();
	void Load(string filename);
	void Clear();
	void SetDtype(DistanceType type);
	bool IsEmpty() const;
	int DeleteNode(Tree* t1);
	int DeleteTree(Tree* t1);
	int MatchNodes(Tree* t1, Tree* t2);
	void UpdateTreeDeleteCosts(Tree* T);
};


#endif

